package day22;
import java.util.*;
public class learn1 {
    private String name;
    //无参构造方法
    public learn1(){
    }
    //有参构造方法
    public learn1(String name) {
        this.name = name;

    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //创建集合
        List<String > list=new ArrayList<String>();
        Map<String ,Integer> map=new HashMap<String ,Integer>();
        //控制集合的长度
        for(int i=0;i<=10;i++){
        //添加数据
        list.add(sc.next());}
        //遍历
        for(String  t:list){
            if(map.containsKey(t)){
                map.put(t,map.get(t)+1);
            }else{
                map.put(t,1);
            }
        }
        System.out.println(map.keySet());
        System.out.println(map.values());

        }

    }


